<template>
  <div class="not-found">
    <div class="not-found-container">
      <div class="error-code">404</div>
      <div class="error-title">页面未找到</div>
      <div class="error-message">抱歉，您尝试访问的页面不存在或已被移除。</div>
      <button class="back-btn" @click="goHome">
        <span class="btn-icon">🏠</span> 返回首页
      </button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router";

const router = useRouter();

// 返回首页
const goHome = () => {
  router.push("/");
};
</script>

<style lang="scss" scoped>
.not-found {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.not-found-container {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 500px;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.error-title {
  font-size: 2rem;
  font-weight: 500;
  color: var(--dark-color);
  margin-bottom: 20px;
}

.error-message {
  font-size: 1.1rem;
  color: var(--gray-color);
  margin-bottom: 30px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(58, 123, 213, 0.4);
  }

  .btn-icon {
    margin-right: 10px;
  }
}
</style>
